Opiate addiction is a chronic, relapsing medical condition that can be effectively treated through long-term opiate replacement therapy (ORT). Methadone maintenance therapy (MMT) is the most widely used form of ORT and has been used to treat opiate addiction for over thirty years. MMT has been proven to reduce injection drug use, HIV risk behaviors and recidivism, yet inmates are routinely detoxified from methadone upon incarceration, thus causing an interruption in the treatment of their opiate dependence. Even if inmates are referred to community methadone programs upon release, there is a chance that they will delay or forgo re-entry or will engage in behaviors that put them at high risk for HIV infection or reincarceration before returning to methadone maintenance treatment. Maintaining inmates on methadone therapy during short-term incarceration may facilitate their prompt re-entry into community methadone maintenance programs after release, minimizing the risk of drug relapse, HIV risk behaviors and overdose. Thus, the purpose of this study is to examine the impact of interruption of methadone maintenance treatment (MMT) during short-term incarceration (jail) as this is the standard practice in nearly all correctional facilities in the United States. We will compare methadone detoxification with continued methadone maintenance treatment using a randomized trial and examine continuing treatment post release, relapse to drug use, HIV risk behaviors, reincarceration, and the costs associated with continued MMT vs. methadone detoxification. The targeted population will be 450 individuals who, while enrolled in community methadone treatment, become incarcerated for less than 6 months. Follow-up interviews will occur 1 month post release from incarceration and 6, 12, and 18 months from baseline at an independent study site. Both groups will receive a risk behavior reduction counseling intervention and linkage to community methadone treatment upon release. If this project is able to demonstrate that maintaining inmates on methadone for short-term incarcerations is more beneficial and/or less costly than detoxification, then this can inform correctional policy to encourage collaboration with community substance use treatment providers and to minimize disruption of treatment during short term incarceration.